﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ColorLife.Core.Helper;
using DLUProject.Domain;
using DLUProject.Services;
public partial class QuanLyKTX_Phong_CTPhong : BaseUserControl
{
    public PhongSinhVienModel Model { get; set; }
    public PhongExtension _phongServiceExt { get; set; }
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public int IDPhong
    {
        get
        {
            if (Request.QueryString["id"] != null)
                return Server.UrlEncode(Request.QueryString["id"]).ToInt();
            return -1;
        }
    }
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        if (!IsPostBack)
        {
            Model = _phongServiceExt.GetThongTinPhong(IDPhong);
            if (Model == null || Model.Phong==null)
            {
                Response.Redirect("Default.aspx");
            }

            rptItems.DataSource = Model.SinhViens;
            rptItems.DataBind();
        }
    }
}